package abstractFactory;

import abstractFactory.service.color;
import abstractFactory.service.impl.blue;
import abstractFactory.service.impl.red;
import abstractFactory.service.shape;

/**
 *颜色工厂
 */
public class ColorFactory extends AbstractFactory{
    @Override
    public color getColor(String color) {
        if (color.equalsIgnoreCase("blue")){
            return new blue();
        } else if (color.equalsIgnoreCase("red")) {
            return new red();
        }
        return null;
    }

    @Override
    public shape getShape(String shape) {
        return null;
    }
}
